// import com.alibaba.druid.sql.ast.SQLExpr;
// import com.alibaba.druid.sql.ast.SQLStatementImpl;
// import com.alibaba.druid.sql.visitor.SQLASTVisitor;

#include "SQLShowGrantsStatement.h"
#include "../../visitor/SQLASTVisitor.h"

// @Override
void SQLShowGrantsStatement::accept0(SQLASTVisitor_ptr visitor)
{
  if (visitor->visit(SharedObject(SQLShowGrantsStatement)))
  {
    acceptChild(visitor, user);
  }
  visitor->endVisit(SharedObject(SQLShowGrantsStatement));
}

SQLExpr_ptr SQLShowGrantsStatement::getUser()
{
  return user;
}

void SQLShowGrantsStatement::setUser(SQLExpr_ptr user)
{
  if (user != nullptr)
  {
    user->setParent(SharedObject(SQLShowGrantsStatement));
  }
  this->user = user;
}

SQLExpr_ptr SQLShowGrantsStatement::getOn()
{
  return on;
}

void SQLShowGrantsStatement::setOn(SQLExpr_ptr x)
{
  if (x != nullptr)
  {
    x->setParent(SharedObject(SQLShowGrantsStatement));
  }
  this->on = x;
}
